package com.hn.zhijian.web.config.jwt;

import org.apache.shiro.subject.Subject;
import org.apache.shiro.subject.SubjectContext;
import org.apache.shiro.web.mgt.DefaultWebSubjectFactory;

/**
 * @program: carl-main
 * @description: 不创建Seesion
 * @author: carl
 * @create: 2019-12-09 23:24
 **/
public class JwtDefaultSubjectFactory extends DefaultWebSubjectFactory {
     @Override
    public Subject createSubject(SubjectContext context) {
        // 不创建 session
        context.setSessionCreationEnabled(false);
        return super.createSubject(context);
    }
}
